

// 将列表中的classes和specialized属性合并成classesData属性
export const toGetClassesAndSpecializedTogether = (data: any) => {
    const classes  = data.classes
    const specialized = data.specialized
    const classesData = []

    let splitClasses = classes.split(",");
    let splitSpecialized = specialized.split(",");
    for(let i = 0;i< splitClasses.length; i++){
        classesData.push({'classes':splitClasses[i],'specialized':splitSpecialized[i]})
    }

    return {
        name: data.name,
        ifAnnounced: data.ifAnnounced,
        ifCopy: data.ifCopy,
        ifUpload: data.ifUpload,
        evaluation: data.evaluation,
        context: data.context,
        startTime: data.startTime,
        endTime: data.endTime,
        classesData: classesData,
    }
};